home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / comm1 / amntlsts.lha / StripCNet.rexx < prev   
OS/2 REXX Batch file  |  1996-05-16  |  3KB  |  67 lines

  1. /**************************************************************************\
  2.          $VER: CNet Amiga Stripper, v.01 by Dotoran (16-May-96)
  3.  
  4.     SysOps running a bbs OTHER THAN CNet Amiga can use this script to
  5.     DELETE the CNet Amiga Data files which are also housed within these
  6.     directories.
  7.  
  8.     To run this script, open a CLI/Shell window, then issue this command:
  9.  
  10.     1> rx path/StripCNet
  11.  
  12.     where "path/" is replaced by the exact path location this script is
  13.     located in.
  14.                                                                  - Dotoran
  15. \**************************************************************************/
  16. options results ; lf="0A"x ; say "H" ; call SETUP
  17. say "     AmiNet Text Files `CNet Data File' Stripper, v.01 by Dotoran!     "lf
  18.  
  19. say "   This script will strip the CNet Amiga data files from the included"
  20. say "directories for those SysOps NOT running CNet Amiga."
  21.  
  22. say lf"Enter path to `Aminet/' directory: (Not including `Aminet/')"
  23. pull path
  24.  
  25. if ~exists(path'Aminet/') then do
  26.   say "I could not find `"path"Aminet/'... Exiting..."lf ; exit ; end
  27.  
  28. path=path"Aminet/"
  29.  
  30. say lf"   There is a text file titled `sys.entry' which resides in the `data/'"
  31. say "directories which are about to be deleted. These files can act as title"
  32. say "screens you could use when a user enters each area. Would you like these"
  33. say "files copied to an alternate directory first? (Y or N)"
  34. pull entry
  35.  
  36. if entry="Y" then do
  37.   say lf"Creating `EntryScreens/' directory inside `Aminet/' directory..."
  38.   address command "makedir "path"EntryScreens"
  39.   say "Copying `sys.entry' files into `EntryScreens/' directory..."lf
  40.   say "  Copying main title screen as `!MainTitle'..."
  41.   address command "copy "path"data/sys.entry "path"EntryScreens/!MainTitle"
  42.   do i=1 to dirs
  43.     say "  Copying "dir.i"data/sys.entry as `"strip(dir.i,,"/")"_Title'..."
  44.     address command "copy "path||dir.i"data/sys.entry "path"EntryScreens/"strip(dir.i,,"/")"_Title"
  45.   end i
  46. end
  47.  
  48. say lf"Now deleting the `data/' directories..."lf
  49. say "Deleting main data directory..."
  50. address command "delete "path"data/ ALL FORCE"
  51. do i=1 to dirs
  52.   say lf"Deleting the `"dir.i"data/' directory..."
  53.   address command "delete "path||dir.i"data/ ALL FORCE"
  54. end i
  55.  
  56. say lf"Finished! You are now left with just the AmiNet Text Files, with title"
  57. say "screens located in "path"EntryScreens/"lf
  58.  
  59. exit
  60. SETUP: ; dirs=15
  61.   dir.1 ="Biz/"     ; dir.2 ="Comm/"    ; dir.3 ="Demo/"
  62.   dir.4 ="Dev/"     ; dir.5 ="Disk/"    ; dir.6 ="Docs/"
  63.   dir.7 ="Game/"    ; dir.8 ="Gfx/"     ; dir.9 ="Hard/"
  64.   dir.10="Misc/"    ; dir.11="Mods/"    ; dir.12="Mus/"
  65.   dir.13="Pix/"     ; dir.14="Text/"    ; dir.15="Util/"
  66.  return
  67.